//
//  BVHomeFirstCoverView.m
//  BVHomeScene
//
//  Created by 崔晋 on 2019/10/19.
//

#import "BVHomeFirstCoverView.h"

@implementation BVHomeFirstCoverView

- (void)drawRect:(CGRect)rect {
    [super drawRect:rect];
    
    CGContextRef context = UIGraphicsGetCurrentContext();
    
    CGMutablePathRef path = CGPathCreateMutable();
    CGPathMoveToPoint(path, nil, self.bounds.size.width, 0);
    CGPathAddLineToPoint(path, nil, 0, self.height * (3.0 / 5.0));
    CGPathAddLineToPoint(path, nil, 0, self.height);
    CGPathAddLineToPoint(path, nil, self.width, self.height);
    CGContextAddPath(context, path);
    
    CGContextSetFillColorWithColor(context, [UIColor colorWithWhite:0 alpha:0.2].CGColor);
    CGContextSetLineWidth(context, 1);
    CGContextDrawPath(context, kCGPathFill);
    CGPathRelease(path);
    
    
}

@end
